package nml.mail.reg.await;

import nml.mail.reg.Reg;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class  gmx_com extends Reg{

	public void reg(String username, String password) {		
		

		String url = "http://www.gmx.com/registration.html";
		get(url);
		
		dr.findElement(By.name("ListRegistrationData:0:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:RowFirstName:Field")).sendKeys("Link");
		dr.findElement(By.name("ListRegistrationData:0:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:RowLastName:Field")).sendKeys("Hapil");
		
		
		

		dr.findElement(By.name("ListRegistrationData:0:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:RowBirthDate:Field:month")).sendKeys("Feb");
		
		
		dr.findElement(By.name("ListRegistrationData:0:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:RowBirthDate:Field:day")).sendKeys("21");
		dr.findElement(By.name("ListRegistrationData:0:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:RowBirthDate:Field:year")).sendKeys("1980");
		
		
		
		
		dr.findElement(By.name("ListRegistrationData:1:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:RowAlias:Field:FieldAlias")).sendKeys(username);
 		dr.findElement(By.name("ListRegistrationData:2:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:panelSetPassword:RowPassword:Field")).sendKeys(password);
		dr.findElement(By.name("ListRegistrationData:2:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:panelSetPassword:RowPasswordRetype:Field")).sendKeys(password);
		
		dr.findElement(By.name("ListRegistrationData:3:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:PanelSecurityQuestion:RowSecurityQuestion:Field")).sendKeys("What city were you born in?");
		
		dr.findElement(By.name("ListRegistrationData:3:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:PanelSecurityQuestion:RowSecurityQuestionAnswer:Field")).sendKeys("i just a man");
	
		
		
		dr.findElement(By.name("ListRegistrationData:4:ItemRegistrationData:BorderBoxRegistrationData:PanelRegistrationData:PanelCaptcha:RowCaptcha:Field")).click();
		
		
		System.out.println(username+"@gmx.com\t"+password);
	}

	public static void main(String[] args) {
		new gmx_com().reg("softamytog", "qq3131798654");
	}
	
	
}
